package com.example.myproject.web;

import com.example.myproject.service.jdbcTemplate.UserService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by xi on 2017/7/15.
 */
@RequestMapping(value="/jdbc")
@RestController
public class UserJdbcTemplateController {

    @Autowired
    private UserService userService;

    @ApiOperation(value="创建用户", notes="根据User对象创建用户")
    @ApiImplicitParam(name = "user", value = "用户详细实体user", required = true, dataType = "User")
    @RequestMapping(value="/createUser", method= RequestMethod.GET)
    public String createUser() {
        userService.create("1",2);
        return "success";
    }

}
